<template>
    <view class="applyAppraisal" :style="{ height: ISIphone ? '96vh' : '100vh' }">
        <view class="top">
            <img style="width: 80%; margin: 0 auto"
                src="https://nfzjszlb.jst.zj.gov.cn/serverfile/zheliban/icon/YPC/11.png" />
            <p>
                <span style="
            width: 31%;
            display: inline-block;
            text-align: left;
            padding-left: 0%;
          ">鉴定申请</span>
                <span style="width: 31%; display: inline-block; text-align: center">合同签订</span>
                <span style="
            width: 31%;
            display: inline-block;
            text-align: center;
            padding-left: 12%;
          ">房屋整治</span>
            </p>
        </view>
        <view class="backgrounds"></view>
        <van-tabs :value="active" color="dodgerblue" line-width="80px" background="#eee" title-active-color="dodgerblue"
            line-height="4px" @click="handlegoto1">
            <van-tab title="本人申请">
                <view class="list">
                    <view v-for="(item, index) in ListData" :key="index">
                        <!-- 注意，如果需要兼容微信小程序，最好通过setRules方法设置rules规则 -->
                        <view v-if="item.title" class="title">
                            <span>{{ item.name }}</span>
                            <span v-if="item.name == '房屋鉴定'" style="color: #d2d2d2; font-size: 0.8rem; float: right">{{
                                item.rightName }}</span>
                            <span v-else v-show="ISSSowSpan" @click="handleGethouseData"
                                style="color: dodgerblue; font-size: 0.8rem; float: right">{{ item.rightName }}</span>
                        </view>
                        <u-form labelPosition="left" :model="model1" ref="form1" v-else>
                            <u-form-item :label="item.name" labelWidth="200" :prop="item.key" borderBottom
                                :required="item.required" ref="item1"
                                v-if="(!item.XIALA && !item.type) || (!item.XIALA && (model1.FWLX === '农村房屋' && item.type === '农村房屋' || model1.FWLX === '城镇房屋' && item.type === '城镇房屋'))">
                                <u-input :placeholder="'请输入' + item.name" :disabled="item.disabled"
                                    v-model="model1[item.key]" border="none"></u-input>
                            </u-form-item>
                            <u-form-item
                                v-if="(item.XIALA && !item.type) || (item.XIALA && (model1.FWLX === '农村房屋' || item.type === '农村房屋' || model1.FWLX === '城镇房屋' || item.type === '城镇房屋'))"
                                :label="item.name" labelWidth="200" :required="item.required" :prop="item.key" borderBottom
                                @click="
                                    item.name == '鉴定机构' ? handlegoto() : '';
                                XIALADATA[item.keys] = true;

                                " ref="item1">
                                <u--input :placeholder="'请输入' + item.name" v-model="model1[item.key]" disabled
                                    disabledColor="#ffffff" border="none"></u--input>
                                <u-icon slot="right" name="arrow-right"></u-icon>
                            </u-form-item>
                        </u-form>
                        <u-picker @closeOnClickOverlay="true" :show="XIALADATA[item.keys]" :columns="item.actions"
                            @change="change" @cancel="cancel(item.keys)" @confirm="confirm" :keyName="item.keyName">
                        </u-picker>
                    </view>
                    <view>
                        <view class="title"> 材料上传 </view>
                        <view>
                            <u-cell-group>
                                <u-cell size="large" title="材料文件" :value="FILENAME" label="支持pdf\word等文件格式上传"></u-cell>
                                <u-upload @afterRead="afterRead" accept="pdf" @delete="deletePic" :previewImage="false"
                                    :fileList="fileList6" name="6" multiple :maxCount="1" width="100">
                                    <view style="position: absolute; right: 0; top: 1.7rem">
                                        <u-button size="small" type="primary" :plain="true" text="上传"></u-button>
                                    </view>
                                </u-upload>
                            </u-cell-group>
                            <u-cell-group>
                                <u-cell size="large" title="材料照片" :value="FILENAME1" label="如果上传了材料文件不必再拍照上传"></u-cell>
                                <view style="padding: 0.6rem">
                                    <u-upload @afterRead="afterRead1" accept="image" @delete="deletePic1"
                                        :fileList="fileList1" name="1" multiple :maxCount="10" width="320rpx"
                                        height="200rpx"></u-upload>
                                </view>
                            </u-cell-group>
                        </view>
                    </view>

                </view>
                <view class="backgrounds"></view>
                <view class="footer">
                    <view class="protocol_box">
                        <view class="select" :class="{ active: agree }" @click="agree = !agree"></view>
                        <text style="color: black" @click="onPageJump('/pages/user/protocol')">本人承诺，以上填报的房产信息属实</text>
                    </view>
                    <span>请确保资料真实有效,我们会在第一时间处理您的建房申请</span>
                    <u-button @click="handleGotonext" style="width: 96%; margin-top: 1rem" text="发起房屋鉴定申请" size="large"
                        color="linear-gradient(to right, rgb(66, 83, 216), rgb(213, 51, 186))"></u-button>
                </view>
            </van-tab>
            <!-- <van-tab title="为他人代办">
        <view class="selectiveExamination-nfcc"> </view>
      </van-tab> -->
        </van-tabs>
        <u-modal :show="oneshow" @confirm="oneconfirm" :title="onetitle" :content="onecontent"></u-modal>
        <u-modal :show="iSSSow" :showCancelButton="true" @cancel="cancel11" :title="title" @confirm="confirm11"
            :closeOnClickOverlay="true" :content="content"></u-modal>
        <view>
            <u-toast ref="uToast"></u-toast>
        </view>
        <u-popup :show="show" @close="close" @open="open">
            <view style="padding: 10px;max-height:70vh;overflow-y: auto;">
                <u-search placeholder="请输入坐落地址或项目名称" v-model="address" @search="search"></u-search>
                <view v-for="(item1, index1) in ListDataArr" :key="index1">
                    <view v-for="(item, index) in ListData1" :key="index">
                        <view v-if="item.title" class="title">
                            <span>{{ item.name }}</span>
                            <span v-if="item.name == '房屋鉴定'" style="color: #d2d2d2; font-size: 0.8rem; float: right">{{
                                item.rightName }}</span>
                            <span v-else v-show="ISSSowSpan" @click="selectData(item1)"
                                style="color: dodgerblue; font-size: 0.8rem; float: right">{{ item.rightName }}</span>
                        </view>
                        <!-- 注意，如果需要兼容微信小程序，最好通过setRules方法设置rules规则 -->
                        <u--form labelPosition="left" :model="model1" ref="form1" v-else>
                            <u-form-item :label="item.name" labelWidth="200" :prop="item.key" borderBottom
                                :required="item.required" ref="item1">
                                <u--input :placeholder="'请输入' + item.name" readonly v-model="item1[item.key]"
                                    border="none"></u--input>
                            </u-form-item>
                        </u--form>
                        <u-picker @closeOnClickOverlay="true" :show="XIALADATA[item.keys]" :columns="item.actions"
                            @change="change" @cancel="cancel(item.keys)" @confirm="confirm" :keyName="item.keyName">
                        </u-picker>
                    </view>
                </view>
            </view>
        </u-popup>
        <!--<u-button @click="show = true">打开</u-button>-->
        <!--<uni-popup ref="popup" type="bottom">底部弹出 Popup</uni-popup>-->
        <u-popup :show="gaozhishu" @close="close1" mode="bottom" border-radius="14">
            <p style="padding: 10px 0 14px 10px;font-size: 16px;font-weight: 800;">用户告知书</p>
            <scroll-view scroll-y="true" style="height: 600rpx;width:100%;padding: 10rpx;" @scroll="handleScroll">
                <view style="line-height: 40rpx; letter-spacing: 6rpx;" ref="gaozhishu">
                    出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖
                    出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖
                    出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖
                    出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖
                    出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖
                    出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖
                    出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖
                    出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖出淤泥而不染，濯清涟而不妖
                </view>
            </scroll-view>
            <u-button :type="info" @click="fasong">确定</u-button>
        </u-popup>
    </view>
</template>

<script>
import { isIphoneX } from "@/common/utils/safeLimt.js";
import timeFormat from "@/common/js/timeFormat.js";
// import { v4 } from "uuid";
import qs from "qs";
import {
    getDatalistForTree,
    ECAOpenDataView,
    ECAinsertDataView,
    ECAFileServerUpload,
    ECAPrepareCreateProcess,
    ECAPrepareLoadWorkflowScript,
    ECAPrepareLoadCreateProcess,
    ECAPlatSendTask,
    ECAExecProcedure,
    existHouseBaseInfo,
    getRegister,
    getJdFwxxToJs
} from "@/common/utils/api.js";
export default {
    data () {
        let me = this;
        return {
            address: '',
            info: 'default',
            gaozhishu: false,
            show: false,
            ISIphone: false,
            uuid: "",
            FILENAME: "",
            //真实身份证
            RelSFZH: "",
            RelPHONE: "",
            RelSQR: "",
            FILENAME1: "",
            iSSSow: false,
            title: "提示",
            showSex: false,
            agree: false,
            oneshow: false,
            content: "经查询，您名下没有房产",
            onecontent: "请确认您的房屋信息",
            onetitle: "提示",
            fileList6: [],
            fileList1: [],
            model1: {
                SQR: "",
                SFZH: "",
                PHONE: "",
                SSS: "",
                SSX: "",
                SSZ: "",
                SSQY: '',
                SSC: "",
                FWDZ: "",
                JZCS: "",
                ZLDZ: '',
                XMMC: '',
                JZMJ: '',
                JGLX: '',
                JZNF: "",
                JTYT: '',
                JZWBH: '',
                ZMC: '',
                JDJGMC: "",
                TYSHXYDM: "",
                CQRHSYR: "",
                WTSY: "",
                IF_KNJT: "",
                FWLX: ""
            },
            model2: {
                SSS: "",
                SSX: "",
                SSZ: "",
                SSC: "",
                JZCS: "",
                JZNF: "",
                CQRHSYR: "",
                WTSY: "",
                IF_KNJT: "",
            },
            ISSSowSpan: true,
            NowData: "",
            XIALADATA: {
                S: false,
                X: false,
                Z: false,
                C: false,
                JZCS: false,
                JZNF: false,
                CQRHSYR: false,
                showPickerWT: false,
                IF_KNJT: false,
                FWLX: false,
                ZZFS: false
            },
            //还原设置
            ListDataDeep: [],
            ListData: [
                {
                    name: "申请人信息",
                    rightName: "请核对您的身份信息",
                    title: true,
                },
                // {
                //   name: "产权人使用人",
                //   key: "CQRHSYR",
                //   title: false,
                //   XIALA: true,
                //   keyName: "DICNAME",
                //   required: true,
                //   keys: "CQRHSYR",
                //   actions: [
                //     [
                //       {
                //         DICNAME: "产权人",
                //         DICID: "289",
                //         key: "CQRHSYR",
                //         keys: "CQRHSYR",
                //       },
                //       {
                //         DICNAME: "使用人",
                //         DICID: "290",
                //         key: "CQRHSYR",
                //         keys: "CQRHSYR",
                //       },
                //     ],
                //   ],
                // },
                {
                    name: "申请人姓名",
                    key: "SQR",
                    required: true,
                    disabled: false,
                    title: false,
                    XIALA: false,
                },
                {
                    name: "身份证号码",
                    key: "SFZH",
                    required: true,
                    title: false,
                    disabled: false,
                    XIALA: false,
                },
                {
                    name: "手机号",
                    key: "PHONE",
                    disabled: false,
                    required: true,
                    title: false,
                    XIALA: false,
                },
                // {
                //   name: "是否困难家庭",
                //   key: "IF_KNJT",
                //   title: false,
                //   required: true,
                //   XIALA: true,
                //   keyName: "DICNAME",
                //   keys: "IF_KNJT",
                //   actions: [
                //     [
                //       {
                //         DICNAME: "是",
                //         DICID: "5",
                //         key: "IF_KNJT",
                //         keys: "IF_KNJT",
                //       },
                //       {
                //         DICNAME: "否",
                //         DICID: "6",
                //         key: "IF_KNJT",
                //         keys: "IF_KNJT",
                //       },
                //     ],
                //   ],
                // },
                {
                    name: "房屋信息",
                    title: true,
                    rightName: "",
                },
                //农村房屋
                {
                    name: "房屋类型",
                    key: "FWLX",
                    disabled: false,
                    title: false,
                    required: true,
                    XIALA: true,
                    keyName: "DICNAME",
                    keys: "FWLX",
                    actions: [
                        [
                            {
                                DICNAME: "农村房屋",
                                DICID: "农村房屋",
                                key: "FWLX",
                                keys: "FWLX",
                            },
                            {
                                DICNAME: "城镇房屋",
                                DICID: "城镇房屋",
                                key: "FWLX",
                                keys: "FWLX",
                            },
                        ],
                    ],
                },
                {
                    type: '农村房屋',
                    name: "所属市",
                    key: "SSS",
                    disabled: false,
                    required: true,
                    title: false,
                    XIALA: true,
                    keyName: "CITYNAME",
                    keys: "S",
                    actions: [],
                },
                {
                    name: "所属县(区)",
                    type: '农村房屋',
                    key: "SSX",
                    disabled: false,
                    required: true,
                    title: false,
                    XIALA: true,
                    keys: "X",
                    keyName: "CITYNAME",
                    dataguid: "77fdf2b0-0eb5-4243-a0a4-6185299ccd34",
                    actions: [],
                },
                {
                    name: "所属镇",
                    type: '农村房屋',
                    key: "SSZ",
                    required: true,
                    XIALA: true,
                    disabled: false,
                    keyName: "CITYNAME",
                    title: false,
                    keys: "Z",
                    dataguid: "e9c98787-4966-4365-80b0-c1cc678c6f85",
                    actions: [],
                },
                {
                    name: "所属村",
                    type: '农村房屋',
                    key: "SSC",
                    disabled: false,
                    required: true,
                    XIALA: true,
                    keyName: "CITYNAME",
                    title: false,
                    dataguid: "24d07248-ba49-4b82-9029-b5eccaff179d",
                    keys: "C",
                    actions: [],
                },
                {
                    name: "详细地址",
                    type: '农村房屋',
                    key: "FWDZ",
                    disabled: false,
                    required: true,
                    XIALA: false,
                    title: false,
                    keys: "FWDZ",
                },

                // 城镇房屋
                // {
                //     type: '城镇房屋',
                //     name: "所属区域",
                //     key: "SSQY",
                //     disabled: false,
                //     required: true,
                //     title: false,
                //     XIALA: true,
                //     keyName: "CITYNAME",
                //     keys: "S",
                //     actions: [],
                // },
                // {
                //     name: "坐落地址",
                //     type: '城镇房屋',
                //     key: "ZLDZ",
                //     required: true,
                //     disabled: false,
                //     XIALA: false,
                //     title: false,
                //     keys: "ZLDZ",
                // },
                // {
                //     name: "项目名称",
                //     type: '城镇房屋',
                //     key: "XMMC",
                //     required: true,
                //     disabled: false,
                //     XIALA: false,
                //     title: false,
                //     keys: "XMMC",
                // },
                // {
                //     name: "幢名称",
                //     type: '城镇房屋',
                //     key: "ZMC",
                //     required: true,
                //     XIALA: false,
                //     title: false,
                //     disabled: false,
                //     keys: "ZMC",
                // },
                {
                    name: "建筑层数",
                    key: "JZCS",
                    required: false,
                    title: false,
                    disabled: false,
                    XIALA: true,
                    keyName: "DICNAME",
                    keys: "JZCS",
                    actions: [],
                },
                // {
                //     name: "建筑面积",
                //     type: '城镇房屋',
                //     key: "JZMJ",
                //     required: true,
                //     disabled: false,
                //     XIALA: false,
                //     title: false,
                //     keys: "JZMJ",
                // },
                // {
                //     name: "结构类型",
                //     type: '城镇房屋',
                //     key: "JGLX",
                //     required: true,
                //     disabled: false,
                //     XIALA: false,
                //     title: false,
                //     keys: "JGLX",
                // },
                // {
                //     name: "具体用途",
                //     type: '城镇房屋',
                //     key: "JTYT",
                //     disabled: false,
                //     required: true,
                //     XIALA: false,
                //     title: false,
                //     keys: "JTYT",
                // },
                // {
                //   name: "建造年份",
                //   key: "JZNF",
                //   required: false,
                //   title: false,
                //   keyName: "DICNAME",
                //   XIALA: true,
                //   keys: "JZNF",
                //   actions: [],
                // },
                {
                    name: "鉴定整治信息",
                    rightName: "",
                    title: true,
                },
                {
                    name: "鉴定机构",
                    key: "JDJGMC",
                    disabled: false,
                    required: true,
                    title: false,
                    XIALA: true,
                },
                {
                    name: "统一社会信用代码",
                    key: "TYSHXYDM",
                    disabled: false,
                    required: true,
                    title: false,
                    XIALA: false,
                },
                {
                    name: "整治方式",
                    type: '农村房屋',
                    key: "ZZFS",
                    title: false,
                    required: true,
                    disabled: false,
                    XIALA: true,
                    keyName: "DICNAME",
                    keys: "ZZFS",
                    actions: [],
                },
                // {
                //   name: " 委托事由",
                //   rightName: "",
                //   title: true,
                // },
                {
                    name: "委托事由",
                    type: '城镇房屋',
                    key: "WTSY",
                    disabled: false,
                    required: true,
                    keyName: "DICNAME",
                    XIALA: true,
                    title: false,
                    keys: "showPickerWT",
                    actions: [],
                },
            ],
            ListDataArr: [],
            ListData1: [
                {
                    name: "所属区域",
                    rightName: "选择",
                    title: true,
                },

                {
                    name: "建筑物编号",
                    key: "JZWBH",
                    required: true,
                    title: false,
                    XIALA: false,
                },
                {
                    type: '城镇房屋',
                    name: "所属区域",
                    key: "SSQY",
                    required: true,
                    title: false,
                    XIALA: true,
                    keyName: "CITYNAME",
                    keys: "S",
                    actions: [],
                },
                {
                    name: "坐落地址",
                    type: '城镇房屋',
                    key: "ZLDZ",
                    required: true,
                    XIALA: false,
                    title: false,
                    keys: "ZLDZ",
                },
                {
                    name: "项目名称",
                    type: '城镇房屋',
                    key: "XMMC",
                    required: true,
                    XIALA: false,
                    title: false,
                    keys: "XMMC",
                },
                {
                    name: "幢名称",
                    type: '城镇房屋',
                    key: "ZMC",
                    required: true,
                    XIALA: false,
                    title: false,
                    keys: "ZMC",
                },
                {
                    name: "建筑层数",
                    key: "JZCS",
                    required: false,
                    title: false,
                    XIALA: true,
                    keyName: "DICNAME",
                    keys: "JZCS",
                    actions: [],
                },
                {
                    name: "建筑面积",
                    type: '城镇房屋',
                    key: "JZMJ",
                    required: true,
                    XIALA: false,
                    title: false,
                    keys: "JZMJ",
                },
                {
                    name: "结构类型",
                    type: '城镇房屋',
                    key: "JGLX",
                    required: true,
                    XIALA: false,
                    title: false,
                    keys: "JGLX",
                },
                {
                    name: "具体用途",
                    type: '城镇房屋',
                    key: "JTYT",
                    required: true,
                    XIALA: false,
                    title: false,
                    keys: "JTYT",
                },
                {
                    name: "鉴定时间",
                    type: '城镇房屋',
                    key: "JDSJ",
                    required: true,
                    XIALA: false,
                    title: false,
                    keys: "JDSJ",
                },
            ],
            formDataCo: {
                SQR: "蒋海燕",
                PHONE: "16635409159",
                SFZH: "142625199602144357",
                SSS: "杭州市",
                SSX: "临安区",
                SSZ: "玲珑街道",
                SSC: "陈村村",
                IF_KNJT: "是",
                FWDZ: "浙江省杭州市临安区玲珑街道陈村村",
                JZCS: "二层",
                JZNF: "2020",
                CQRHSYR: "",
                WTSY: "",
            },
            formDataCo1: {
                SQR: "蒋海燕",
                PHONE: "16635409159",
                SFZH: "142625199602144357",
                SSS: "杭州市",
                SSX: "西湖区",
                SSZ: "北山街道",
                SSC: "上保社区",
                IF_KNJT: "是",
                FWDZ: "浙江省杭州市西湖区北山街道上保社区",
                JZCS: "一层",
                JZNF: "2021",
                CQRHSYR: "",
                WTSY: "",
            },
            dingshiqi: '',
            rules: {
                SFZH: {
                    required: true,
                    pattern:
                        /^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
                    message: "请填写正确的身份证号",
                    trigger: ["blur", "change"],
                },
                PHONE: {
                    required: true,
                    pattern:
                        /^1((34[0-8])|(8\d{2})|(([35][0-35-9]|4[579]|66|7[35678]|9[1389])\d{1}))\d{7}$/,
                    message: "请填写正确的手机号",
                    trigger: ["blur", "change"],
                },
                SQR: {
                    required: true,
                    min: 2,
                    max: 4,
                    message: "请填写正确的姓名",
                    trigger: ["blur", "change"],
                },
            },
            radio: "",
            switchVal: false,
            active: ["0"],
            shenkaobeiData: []
        };
    },
    methods: {
        confirmData (data) {
            // alert(1)
            console.log(this.model1.FWLX)
        },
        fasong(){
            let num = 0;
            this.ListData.forEach((item) => {
                if (item.required && item.type == this.model1['FWLX']) {
                    console.log(this.model1[item.key], item.key);
                    this.model1[item.key] ? "" : (num = num + 1);
                }
            });
            console.log(num, "xiaohe");
            if (num == 0 && this.agree) {
                this.insertDataViewListData();
            } else if (num != 0) {
                this.showToast();
            } else if (!this.agree) {
                this.showToast2();
            }
        },
        selectData (data) {
            // for (let k in data) {
            //     for (let S in this.model1){
            //         debugger
            //         if(k == S){
            //             this.model1[S] =  data[K]
            //         }
            //     }
            // }
            for (let key in data) {
                if (this.model1.hasOwnProperty(key)) {
                    this.model1[key] = data[key];
                }
                this.ListData.forEach(item => {
                    if (item.key == key) {
                        item['disabled'] = true
                    }
                })

            }
            //赋值完毕后需要将对应的值变成不可编辑
            this.show = false
        },
        search (val) {
            if (!val) return this.ListDataArr = this.shenkaobeiData
            this.ListDataArr = this.shenkaobeiData.filter(item => {
                return item.JZWBH && item.JZWBH.indexOf(val) > -1 || item.XMMC && item.XMMC.indexOf(val) > -1
            })
        },
        close () {
            this.show = false
        },
        handleScroll (e) {
            const { scrollTop, offsetTop, scrollHeight } = e.target
            if (scrollHeight - (scrollTop + offsetTop) === 270) {
                this.info = "primary"
                if (this.dingshiqi) {
                    clearInterval(this.dingshiqi);
                }
            }
        },
        close1 () {
            //清除定时器
            this.info = 'default'
            if (this.dingshiqi) {
                clearInterval(this.dingshiqi);
            }
            this.gaozhishu = false
        },
        sexSelect (e) {
            this.model1.sex = e.name;
            this.$refs.form1.validateField("sex");
        },
        handlegoto1 () { },
        plusXing (str, frontLen, endLen) {
            //浙里办新规则
            if (str.length < 9) {
                return "*" + str.substring(1, str.length); //截取name 字符串截取第一个字符
            } else if (str.length > 9 && str.length < 18) {
                return str.substring(0, 3) + "****" + str.substring(7, str.length); //截取第一个和大于第4个字符
            } else {
                return (
                    str.substring(0, 1) +
                    "****************" +
                    str.substring(str.length - 1, str.length)
                );
            }
        },
        //获取区县信息
        getXianOpenDataView: async function (data, data1, data2) {
            let time = Date.now();
            const res = await ECAOpenDataView(
                data2,
                JSON.stringify([{ field: "PID", value: data }]),
                time
            );
            this.ListData.forEach((item) => {
                switch (data1) {
                    case "1":
                        if (item.keys == "X") {
                            item.actions = [];
                            item.actions.push(res.Data);
                            item.actions[0].forEach((items) => {
                                items.keys = "X";
                                items.key = "SSX";
                                items.dataguid = "24d07248-ba49-4b82-9029-b5eccaff179d";
                            });
                        }
                        break;
                    case "2":
                        if (item.keys == "Z") {
                            item.actions = [];
                            item.actions.push(res.Data);
                            item.actions[0].forEach((items) => {
                                items.keys = "Z";
                                items.key = "SSZ";
                                items.dataguid = "d3aaed7c-84ee-4de3-b70e-07fe188cdc8e";
                            });
                        }
                        break;
                    case "3":
                        if (item.keys == "C") {
                            item.actions = [];
                            item.actions.push(res.Data);
                            item.actions[0].forEach((items) => {
                                items.keys = "C";
                                items.key = "SSC";
                                items.dataguid = "";
                            });
                        }
                        break;
                }
            });
        },
        change (e) {
            if (e.value[0]) {
                this.NowData = e.value[0].CITYNAME;
            }
        },
        cancel (data) {
            this.XIALADATA[data] = false;
        },
        citycode1 (str) {
            if (str.endsWith("0000000000") || str.indexOf("33000000") > -1) {
                //省
                return "0";
            } else if (str.endsWith("00000000")) {
                return "1";
            } else if (str.endsWith("000000")) {
                return "2";
            } else if (str.endsWith("000")) {
                return "3";
            }
        },

        key2Upper (obj) {
            for (var key in obj) {
                obj[key.toUpperCase()] = obj[key];
                delete (obj[key]);
            }
            return obj;
        },
        async getJdFwxxToJs () {
            let formData = new FormData();
            formData.append('keyText', '')
            //深拷贝
            const res = await getJdFwxxToJs()
            this.ListDataArr = res.data
            console.log(this.ListDataArr, ' this.ListDataArr')
            this.ListDataArr.forEach(item => {
                return this.key2Upper(item)
            })
            this.shenkaobeiData = JSON.parse(JSON.stringify(this.ListDataArr))
            this.show = true
        },
        confirm (e) {
            //深拷贝ListData  防止改变默认值
            this.ListDataDeep = JSON.parse(JSON.stringify(this.ListData))
            if (e.value[0].DICNAME == '城镇房屋') {
                this.getJdFwxxToJs() 
            }
            // this.getJdFwxxToJs()

            //获取接口数据
            // } else {
            this.ListData = this.ListDataDeep
            // }
            if (e.value[0] && e.value[0].CITYCODE) {
                this.model1[e.value[0].key] = e.value[0].CITYNAME;
                this.model2[e.value[0].key] = e.value[0].CITYCODE;
                this.XIALADATA[e.value[0].keys] = false;
                let str = e.value[0].CITYCODE.toString();
                let str1 = this.citycode1(str);
                console.log(str1);
                if (str1 != undefined) {
                    this.getXianOpenDataView(
                        e.value[0].CITYCODE,
                        str1,
                        e.value[0].dataguid
                    );
                }
            } else {
                console.log(e.value[0]);
                this.model1[e.value[0].key] = e.value[0].DICNAME;
                this.model2[e.value[0].key] = e.value[0].DICID;
                this.XIALADATA[e.value[0].keys] = false;
            }
        },
        handlegoto () {
            uni.navigateTo({
                url: "/pages/Authentication/Authentication?component=applyAppraisal",
            });
            //将当前页面数据保存
            uni.setStorageSync("model1", this.model1);
            uni.setStorageSync("model2", this.model2);
        },
        guid () {
            return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
                /[xy]/g,
                function (c) {
                    var r = (Math.random() * 16) | 0,
                        v = c == "x" ? r : (r & 0x3) | 0x8;
                    return v.toString(16);
                }
            );
        },
        //下一步
        async insertDataViewListData () {
            let time = Date.now();
            let date = timeFormat(null, "yyyy-mm-dd hh:MM:ss");
            if (uni.getStorageSync("ISWechat") == "1") {
                this.model1.SFZH = uni.getStorageSync("userData").personInfo.idNo;
                this.model1.PHONE = uni.getStorageSync("userData").personInfo.phone;
                this.model1.SQR = uni.getStorageSync("userData").personInfo.userName;
            } else if (
                uni.getStorageSync("ISWechat") == "0" &&
                (uni.getStorageSync("isPer") == "1" ||
                    uni.getStorageSync("isPer") == "0")
            ) {
                this.model1.SFZH = uni.getStorageSync("userData").idnum;
                this.model1.PHONE = uni.getStorageSync("userData").mobile;
                this.model1.SQR = uni.getStorageSync("userData").username;
            }
            //注册企业
            let httpData = {
                loginName: uni.getStorageSync("JDGS").tyshxydm,
                idNum: 1,
                phone: 1,
                cityCode: this.model2.SSS,
                qyId: uni.getStorageSync("JDGS").tyshxydm,
                roleType: "99",
                aliasName: uni.getStorageSync("JDGS").qymc,
                userId: uni.getStorageSync("JDGS").tyshxydm,
            };
            const res = await getRegister(httpData);
            if (!res.data.token) {
                this.showToast3();
                return;
            }
            //将id值放进
            for (let key in this.model2) {
                for (let keys in this.model1) {
                    if (keys == key) {
                        this.model1[keys] = this.model2[key];
                    }
                }
            }
            this.model1.SQRLX = "1";
            this.model1.JDJGMC = uni.getStorageSync("JDGS").qymc;
            this.model1.SQLX = "35";
            this.model1.WTSJ = date;
            this.model1.CREATETIME = date;
            this.model1.BUILDINGCODE = this.shenkaobeiData[0].buildingcode;
            this.model1.BUILDINGID = this.shenkaobeiData[0].buildingid;
            if (!this.uuid) {
                this.uuid = this.guid();
                this.model1.ROW_GUID = this.uuid;
            }
            this.model1.ROW_GUID = this.uuid;
            this.model1.CREATER_USER_PKID = uni.getStorageSync("userId");
            this.model1.SHZT = 643
            console.log(this.model1);
            let strParams = [this.model1];
            let formdata = {
                dataGuid: "55bda5cf-5037-42a7-987e-585d35cd5418",
                strParams: JSON.stringify(strParams),
                time: time,
                viewParameter: {},
            };
            try {
                const res = await ECAinsertDataView(formdata);

                if (res.Success) {
                    //先创建流程
                    let data1 = {
                        wfGuid: "{48A968B4-A044-4115-A9DB-099029B2E011}",
                        //生成一个uuid
                        entityRowGuid: this.uuid,
                        time: time,
                        viewParameter: {},
                    };
                    const res1 = await ECAPrepareCreateProcess(data1);
                    //调用ECAPrepareLoadWorkflowScript
                    const res2 = await ECAPrepareLoadWorkflowScript(
                        "-1",
                        time,
                        "{48A968B4-A044-4115-A9DB-099029B2E011}"
                    );
                    let formdata1 = {
                        matterGuid: "",
                        wfGuid: "{48A968B4-A044-4115-A9DB-099029B2E011}",
                        bizGuid: "ec2ac527-d791-48b6-9f14-6d901f6a8e30",
                        entityRowGuid: this.uuid,
                        time: time,
                        viewParameter: {},
                    };
                    const res3 = await ECAPrepareLoadCreateProcess(formdata1);
                    const res4 = await ECAPrepareLoadWorkflowScript(
                        res3.TaskId,
                        time,
                        "{48A968B4-A044-4115-A9DB-099029B2E011}"
                    );
                    //获取下一个环节的人员\
                    let data3 = {
                        procName: "get_user_by_taskId",
                        dtParams: JSON.stringify([
                            {
                                i_taskId: res3.TaskId,
                                i_type: 0,
                            },
                        ]),
                    };
                    const user = await ECAExecProcedure(data3);
                    console.log(user);
                    let data2 = {
                        taskId: res3.TaskId,
                        direction: 0,
                        wfBoxGuid: "ec2ac527-d791-48b6-9f14-6d901f6a8e30",
                        actionText: "",
                        taskName: "",
                        wfGuid: "{48A968B4-A044-4115-A9DB-099029B2E011}",
                        sendNodes: JSON.stringify([
                            {
                                TNID: 124,
                                PTNID: 1,
                                TEXT: user.Data[0]._USERNAME,
                                WFNODEGUID: "{FA54F190-31A8-41A1-9CA8-798339A5FC68}",
                                WFNODETYPE: 2,
                                WFNODENAME: "鉴定机构",
                                ISUSER: 1,
                                USERID: user.Data[0]._USERID,
                                USERNAME: user.Data[0]._USERNAME,
                                SINGLEASSIGN: true,
                                PREJUNCNODEGUID: "",
                                SORTNUM: 0,
                                selected: true,
                            },
                        ]),
                        time,
                    };
                    //拿到takid
                    const res5 = await ECAPlatSendTask(data2);
                    if (res5.Success) {
                        this.showToast1();
                        setTimeout(() => {
                            this.$nextTick(() => {
                                uni.navigateTo({
                                    url: "/",
                                    animationType: "fade-in",
                                });
                            });
                        }, 1000);
                    } else {
                        this.model1 = uni.getStorageSync("model1");
                        this.showToast3();
                    }
                }
            } catch (err) {
                this.model1 = uni.getStorageSync("model1");
                this.showToast3();
            }
        },
        handleGotonext () {
            this.gaozhishu = true
            this.dingshiqi = setInterval(() => {
                this.info = "primary"
            }, 7000)
            // let num = 0;
            // this.ListData.forEach((item) => {
            //     if (item.required && item.type == this.model1['FWLX']) {
            //         console.log(this.model1[item.key], item.key);
            //         this.model1[item.key] ? "" : (num = num + 1);
            //     }
            // });
            // console.log(num, "xiaohe");
            // if (num == 0 && this.agree) {
            //     this.insertDataViewListData();
            // } else if (num != 0) {
            //     this.showToast();
            // } else if (!this.agree) {
            //     this.showToast2();
            // }
        },
        showToast1 (params) {
            this.$refs.uToast.show({
                message: "发送成功",
                type: "success",
            });
        },
        showToast (params) {
            this.$refs.uToast.show({
                message: "请填写必填项",
                type: "error",
            });
        },
        showToast2 (params) {
            this.$refs.uToast.show({
                message: "请勾选本人承诺",
                type: "error",
            });
        },
        showToast5 (params) {
            this.$refs.uToast.show({
                message: "请上传附件",
                type: "error",
            });
        },
        showToast8 (params) {
            this.$refs.uToast.show({
                message: "不支持此类型文件上传",
                type: "error",
            });
        },
        showToast4 (params) {
            this.$refs.uToast.show({
                message: "上传成功",
                type: "success",
            });
        },
        showToast3 (params) {
            this.$refs.uToast.show({
                message: "提交失败",
                type: "error",
            });
        },
        async handleGethouseData () {
            try {
                const res = await existHouseBaseInfo(this.RelSFZH, this.RelSQR);
                console.log(res);
                this.HouseData = res.data;
                if (this.HouseData.length > 1) {
                    this.content = "请确认你的房产信息";
                    this.iSSSow = true;
                    //弹出选择界面
                } else if (this.HouseData.length == 1) {
                    this.iSSSow = false;
                    //直接赋值
                    this.oneshow = true;
                    //91440300708461136T
                    //接口参数不一致只能单个赋值
                    this.model1.FWDZ = this.HouseData[0].XXDZ;
                    this.model1.JZCS = this.HouseData[0].JZCS;
                    this.model1.JZNF = this.HouseData[0].JSNF;
                    this.model1.SSS = this.HouseData[0].cityName;
                    this.model2.SSS =
                        this.HouseData[0].cityCode.substring(0, 4) + "00000000";
                    this.getXianOpenDataView1(
                        this.model2.SSS,
                        "77fdf2b0-0eb5-4243-a0a4-6185299ccd34",
                        "1"
                    );
                    this.model2.SSX =
                        this.HouseData[0].cityCode.substring(0, 6) + "000000";
                    this.getXianOpenDataView1(
                        this.model2.SSX,
                        "24d07248-ba49-4b82-9029-b5eccaff179d",
                        "2"
                    );
                    this.model2.SSZ = this.HouseData[0].cityCode.substring(0, 9) + "000";
                    this.getXianOpenDataView1(
                        this.model2.SSZ,
                        "d3aaed7c-84ee-4de3-b70e-07fe188cdc8e",
                        "3"
                    );
                    this.model2.SSC = this.HouseData[0].cityCode;
                    this.model1.SSX = this.HouseData[0].countryName;
                } else {
                    this.iSSSow = true;
                }
            } catch (err) {
                this.iSSSow = true;
            }
        },
        getXianOpenDataView1: async function (data, data2, data1) {
            let time = Date.now();
            const res = await ECAOpenDataView(
                data2,
                JSON.stringify([{ field: "PID", value: data }]),
                time
            );
            this.ListData.forEach((item) => {
                switch (data1) {
                    case "1":
                        if (item.keys == "X") {
                            item.actions.push(res.Data);
                            item.actions[0].forEach((items) => {
                                items.keys = "X";
                                items.key = "SSX";
                                items.dataguid = "24d07248-ba49-4b82-9029-b5eccaff179d";
                            });
                        }
                        break;
                    case "2":
                        if (item.keys == "Z") {
                            item.actions.push(res.Data);
                            //赋值
                            item.actions[0].forEach((items) => {
                                if (items.CITYCODE == this.model2.SSZ) {
                                    this.model1.SSZ = items.CITYNAME;
                                }
                                items.keys = "Z";
                                items.key = "SSZ";
                                items.dataguid = "d3aaed7c-84ee-4de3-b70e-07fe188cdc8e";
                            });
                        }
                        break;
                    case "3":
                        if (item.keys == "C") {
                            item.actions.push(res.Data);
                            item.actions[0].forEach((items) => {
                                if (items.CITYCODE == this.model2.SSC) {
                                    this.model1.SSC = items.CITYNAME;
                                }
                                items.keys = "C";
                                items.key = "SSC";
                                items.dataguid = "";
                            });
                        }
                        break;
                }
            });
        },
        oneconfirm () {
            this.oneshow = false;
        },
        cancel11 () {
            this.iSSSow = false;
        },
        confirm11 () {
            this.iSSSow = false;
            if (this.HouseData.length > 1) {
                this.$nextTick(() => {
                    console.log();
                    let data = JSON.stringify(this.HouseData);
                    uni.navigateTo({
                        url: "/pages/threePage/threePage?data=" + data,
                    });
                });
            }
        },
        getenumerationData: async function (data = []) {
            //formData参数
            data = qs.parse(data);
            for (let item in data) {
                let time = Date.now();
                const res = await ECAOpenDataView(data[item], JSON.stringify([]), time);
                console.log(res);
                switch (data[item]) {
                    case "e9c98787-4966-4365-80b0-c1cc678c6f85":
                        //市
                        this.ListData.forEach((item) => {
                            if (item.keys == "S") {
                                item.actions.push(res.Data);
                                item.actions[0].forEach((item) => {
                                    item.keys = "S";
                                    item.key = "SSS";
                                    item.dataguid = "77fdf2b0-0eb5-4243-a0a4-6185299ccd34";
                                });
                            }
                        });
                        break;
                    case "77fdf2b0-0eb5-4243-a0a4-6185299ccd34":
                        //镇
                        break;
                    case "24d07248-ba49-4b82-9029-b5eccaff179d":
                        //村
                        break;
                    case "30c64dd9-9db2-4d30-ad8f-62d219de2325":
                        //事件委托
                        this.ListData.forEach((items) => {
                            if (items.name == "委托事由") {
                                items.actions.push(res.Data);
                                items.actions[0].forEach((item) => {
                                    item.keys = "showPickerWT";
                                    item.key = "WTSY";
                                });
                            }
                        });
                        break;
                    case "bcc29049-e7a8-450c-b40e-e4cd2e600cb9":
                        //建筑层数
                        this.ListData.forEach((items) => {
                            if (items.name == "建筑层数") {
                                items.actions.push(res.Data);
                                items.actions[0].forEach((item) => {
                                    item.keys = "JZCS";
                                    item.key = "JZCS";
                                });
                            }
                        });
                        break;
                    case "5606ea58-5e29-470d-8d99-2a936585ad99":
                        //建造年份
                        this.ListData.forEach((items) => {
                            if (items.name == "建造年份") {
                                items.actions.push(res.Data);
                                items.actions[0].forEach((item) => {
                                    item.keys = "JZNF";
                                    item.key = "JZNF";
                                });
                            }
                        });
                        break;
                    case "4ce1e3d4-8b96-4929-8f33-49ce9517e2ed":
                        //村
                        this.ListData.forEach((items) => {
                            if (items.name == "整治方式") {
                                items.actions.push(res.Data);
                                items.actions[0].forEach((item) => {
                                    item.keys = "ZZFS";
                                    item.key = "ZZFS";
                                });
                            }
                        });
                        break;
                }
            }
        },
        // 删除图片
        deletePic (event) {
            this[`fileList${event.name}`].splice(event.index, 1);
        },
        // 新增图片
        async afterRead (event) {
            // 当设置 mutiple 为 true 时, file 为数组格式，否则为对象格式
            console.log(event, "event");
            this.FILENAME = event.file[0].name;
            let lists = [].concat(event.file);
            let fileListLen = this[`fileList${event.name}`].length;
            lists.map(async (item) => {
                console.log(item.name.indexOf("pdf"));
                if (item.name.indexOf("pdf") != -1 || item.name.indexOf("doc") != -1) {
                    this[`fileList${event.name}`].push({
                        ...item,
                        status: "uploading",
                        message: "上传中",
                    });
                    for (let i = 0; i < lists.length; i++) {
                        const result = await this.uploadFilePromise(lists[i].url);
                        let item = this[`fileList${event.name}`][fileListLen];
                        this[`fileList${event.name}`].splice(
                            fileListLen,
                            1,
                            Object.assign(item, {
                                status: "success",
                                message: "",
                                url: result,
                            })
                        );
                        fileListLen++;
                    }
                } else {
                    this.showToast8();
                    return;
                }
            });
        },
        async uploadFilePromise (file) {
            if (!this.uuid) {
                this.uuid = this.guid();
            }
            return new Promise((resolve, reject) => {
                let a = uni.uploadFile({
                    url:
                        "https://nfzjszlb.jst.zj.gov.cn/eca/fwjd/FileServer/api/Upload?token=" +
                        uni.getStorageSync("token"), // 仅为示例，非真实的接口地址
                    filePath: file,
                    name: "file",
                    formData: {
                        toRowGuid: this.uuid,
                        groupGuid: "02de3608-565e-4e9a-959f-2c1b4e623065",
                        token: uni.getStorageSync("token"),
                    },
                    success: (res) => {
                        setTimeout(() => {
                            this.showToast4();
                            resolve(res);
                        }, 1000);
                    },
                });
            });
        },
        // 删除图片
        deletePic1 (event) {
            this[`fileList${event.name}`].splice(event.index, 1);
        },
        // 新增图片
        async afterRead1 (event) {
            // 当设置 mutiple 为 true 时, file 为数组格式，否则为对象格式
            let lists = [].concat(event.file);
            let fileListLen = this[`fileList${event.name}`].length;
            lists.map((item) => {
                this[`fileList${event.name}`].push({
                    ...item,
                    status: "uploading",
                    message: "上传中",
                });
            });
            for (let i = 0; i < lists.length; i++) {
                const result = await this.uploadFilePromise1(lists[i].url);
                let item = this[`fileList${event.name}`][fileListLen];
                this[`fileList${event.name}`].splice(
                    fileListLen,
                    1,
                    Object.assign(item, {
                        status: "success",
                        message: "",
                        url: result,
                    })
                );
                fileListLen++;
            }
        },
        async uploadFilePromise1 (file) {
            if (!this.uuid) {
                this.uuid = this.guid();
            }
            return new Promise((resolve, reject) => {
                let a = uni.uploadFile({
                    url:
                        "https://nfzjszlb.jst.zj.gov.cn/eca/fwjd/FileServer/api/Upload?token=" +
                        uni.getStorageSync("token"), // 仅为示例，非真实的接口地址
                    filePath: file,
                    name: "file",
                    formData: {
                        toRowGuid: this.uuid,
                        groupGuid: "f46db8bc-ac1c-4f5d-ab0e-45166a94b6f1",
                        token: uni.getStorageSync("token"),
                    },
                    success: (res) => {
                        setTimeout(() => {
                            this.showToast4();
                            resolve(res);
                        }, 1000);
                    },
                });
            });
        },
    },
    onLoad (data) {
        // this.getXianOpenDataView("330000000000", "0");
        if (uni.getStorageSync("ISWechat") == "1") {
            this.RelSQR = uni.getStorageSync("userData").personInfo.userName;
            this.RelPHONE = uni.getStorageSync("userData").personInfo.phone;
            this.RelSFZH = uni.getStorageSync("userData").personInfo.idNo;
            this.model1.SFZH = this.plusXing(
                uni.getStorageSync("userData").personInfo.idNo
            );
            this.model1.PHONE = this.plusXing(
                uni.getStorageSync("userData").personInfo.phone
            );
            this.model1.SQR = this.plusXing(
                uni.getStorageSync("userData").personInfo.userName
            );
        } else if (
            uni.getStorageSync("ISWechat") == "0" &&
            (uni.getStorageSync("isPer") == "1" || uni.getStorageSync("isPer") == "0")
        ) {
            this.RelSQR = uni.getStorageSync("userData").userName;
            this.RelPHONE = uni.getStorageSync("userData").mobile;
            this.RelSFZH = uni.getStorageSync("userData").idnum;
            this.model1.SFZH = this.plusXing(uni.getStorageSync("userData").idnum);
            this.model1.PHONE = this.plusXing(uni.getStorageSync("userData").mobile);
            this.model1.SQR = this.plusXing(uni.getStorageSync("userData").username);
        }
        let data1 = [
            "77fdf2b0-0eb5-4243-a0a4-6185299ccd34",
            "e9c98787-4966-4365-80b0-c1cc678c6f85",
            "24d07248-ba49-4b82-9029-b5eccaff179d",
            "30c64dd9-9db2-4d30-ad8f-62d219de2325",
            "bcc29049-e7a8-450c-b40e-e4cd2e600cb9",
            "5606ea58-5e29-470d-8d99-2a936585ad99",
            //整治方式
            '4ce1e3d4-8b96-4929-8f33-49ce9517e2ed'
        ];
        this.getenumerationData(qs.stringify(data1));
        this.ISIphone = isIphoneX();
        uni.$on("details", (data) => {
            this.model1 = uni.getStorageSync("model1");
            this.model2 = uni.getStorageSync("model2");
            this.model1.JDJGMC = uni.getStorageSync("JDGS").qymc;
            this.model1.TYSHXYDM = uni.getStorageSync("JDGS").tyshxydm;
        });
        if (data.model1 && data.model2) {
            this.model1 = JSON.parse(data.model1);
            this.model2 = JSON.parse(data.model2);
        }
        if (ZWJSBridge) {
            ZWJSBridge.setTitle({
                title: "个人委托",
            })
                .then((res) => { })
                .catch((err) => { });
        }
        // if (data) {
        //   uni.setStorageSync("name", data.name);
        //   if (data.name == "房屋一") {
        //     this.model1 = this.formDataCo;
        //   } else if (data.name == "房屋二") {
        //     this.model1 = this.formDataCo1;
        //   }
        // }
    },
    onUnload () {
        uni.$off("details");
    },
};
</script>


<style lang="scss" scoped>
@import "@/style/mixin.scss";

.applyAppraisal {
    overflow: auto;

    .title {
        padding: 0.6rem 0;
        font-size: 1.1rem;
        font-weight: 800;
    }

    .list {
        padding: 1rem;
    }

    .footer {
        padding-top: 0.6rem;
        text-align: center;

        span {
            font-size: 14px;
            color: #007aff;
            margin-bottom: 1rem;
        }

        .protocol_box {
            margin-bottom: 24rpx;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            font-size: 28rpx;
            color: #333333;

            .select {
                width: 36rpx;
                height: 36rpx;
                background-image: url("../../static/icon/ic_gender_unselected.png");
                background-position: center center;
                background-repeat: no-repeat;
                background-size: 100% auto;
                margin-right: 15rpx;

                &.active {
                    background-image: url("../../static/icon/ic_agreed.png");
                }
            }

            >text {
                color: $themeColor;
            }
        }
    }

    .top {
        height: 30px;
        background: #ffffff;
        margin-bottom: 15px;
        padding-top: 15px;
        text-align: center;

        .origin {
            width: 22px;
            height: 22px;
            background: #007aff;
            border-radius: 50%;
            display: inline-block;
        }

        .line {
            width: 20vw;
            /*height: 1px;*/
            border: 1px dashed #007aff;
            display: inline-block;
        }
    }

    .backgrounds {
        height: 1rem;
        background: #eee;
    }
}
</style>

<style>
::v-deep .u-form-item__body__left__content__label{
    min-width: 200px !important;
}
.uni-input-input, .uni-input-placeholder{
    text-align: right !important;
}
::v-deep .uni-input-input{
    text-align: right !important;
}
</style>